      SUBROUTINE SETUP
      RETURN
      END
C   HS44
      SUBROUTINE EF(X,FX)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),FX
      ICF=ICF+1
      FX=X(1)-X(2)-X(3)-X(1)*X(3)+X(1)*X(4)+X(2)*X(3)-X(2)*X(4)  +
     12.D0*X(1)**2+2.D0*(X(2)-3.D0)**2+2.D0*X(3)**2+2.D0*(X(4)-4.D0)**2
      RETURN
      END
      SUBROUTINE EGRADF(X,GRADF)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),GRADF(NX)
      ICGF=ICGF+1
      GRADF(1)=1.D0-X(3)+X(4)   +4.D0*X(1)
      GRADF(2)=-1.D0+X(3)-X(4)  +4.D0*(X(2)-3.D0)
      GRADF(3)=-1.D0-X(1)+X(2)  +4.D0*X(3)
      GRADF(4)=X(1)-X(2)        +4.D0*(X(4)-4.D0)
      RETURN
      END
      SUBROUTINE EH(I,X,HXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),HXI
      CRES(I)=CRES(I)+1
      RETURN
      END
      SUBROUTINE EGRADH(I,X,GRADHI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GRADHI(NX)
      CGRES(I)=CGRES(I)+1
      RETURN
      END
      SUBROUTINE EG(I,X,GXI)
      INCLUDE 'FUCO.INC'
      INTEGER I,K
      DOUBLE PRECISION X(NX),GXI
      IF ( GUNIT(1,I+NH) .EQ. -1 )CRES(I+NH)=CRES(I+NH)+1      
      IF(I .GT. 4)      GOTO 50
      GXI=X(I)
      RETURN
  50  CONTINUE
      K=I-4
      GOTO(100,200,300,400,500,600),K
  100 CONTINUE
      GXI=8.D0-X(1)-2.D0*X(2)
      RETURN
  200 CONTINUE
      GXI=12.D0-4.D0*X(1)-X(2)
      RETURN
  300 CONTINUE
      GXI=12.D0-3.D0*X(1)-4.D0*X(2)
      RETURN
  400 CONTINUE
      GXI=  8.D0-2.D0*X(3)-X(4)
      RETURN
  500 CONTINUE
      GXI= 8.0D0-X(3)-2.D0*X(4)
      RETURN
  600 CONTINUE
      GXI= 5.0D0-X(3)-X(4)
      RETURN
      END
      SUBROUTINE EGRADG(I,X,GRADGI)
      INCLUDE 'FUCO.INC'
      INTEGER I,J,K
      DOUBLE PRECISION X(NX) ,GRADGI(NX)
      IF ( GUNIT(1,I+NH) .EQ. 1 )RETURN
      CGRES(I+NH)=CGRES(I+NH)+1
      DO      10      J=1,4
      GRADGI(J)=0.D0
  10  CONTINUE
      IF(I .GT. 4)          GOTO  50
      GRADGI(I)= 1.D0
      RETURN
   50 CONTINUE
      K=I-4
      GOTO(100,200,300,400,500,600),K
  100 CONTINUE
      GRADGI(1)=-1.D0
      GRADGI(2)=-2.D0
      RETURN
  200 CONTINUE
      GRADGI(1)=-4.D0
      GRADGI(2)=-1.D0
      RETURN
  300 CONTINUE
      GRADGI(1)=-3.D0
      GRADGI(2)=-4.D0
      RETURN
  400 CONTINUE
      GRADGI(3)=-2.D0
      GRADGI(4)=-1.D0
      RETURN
  500 CONTINUE
      GRADGI(3)=-1.D0
      GRADGI(4)=-2.D0
      RETURN
  600 CONTINUE
      GRADGI(3)=-1.D0
      GRADGI(4)=-1.D0
      RETURN
      END
      BLOCK DATA
      INCLUDE 'BLOCO.INC'
      INTEGER I,J
      DATA NAME/'HS44'/
      DATA X/NX*0.0D0/
      DATA N/4/ , NH/0/ , NG/10/
      DATA DEL0/1.00D0/ ,TAU0/1.00D0/ ,TAU/.1D0/
      DATA ((GUNIT(I,J),I=1,3),J=0,10)
     F    /-1,0,0,1,1,1,1,2,1,1,3,1,1,4,1,
     F    -1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0/
      END
